package bishi.day22_5_19;

import java.util.*;

/**
 * 第一个出现一次的字符
 * @author 是阿秋啊
 * @date 2022/05/19 14:53
 **/
public class first_once_char {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            String s = sc.nextLine();
            Map<Character,Integer> map = new HashMap<>();
            for(int i = 0; i < s.length();i++) {
                map.put(s.charAt(i),map.getOrDefault(s.charAt(i),0) + 1);
            }
            boolean flag = true;
            for(int i = 0; i < s.length();i++) {
                if(map.get(s.charAt(i)) == 1) {
                    System.out.println(s.charAt(i));
                    flag = false;
                    break;
                }
            }
            if(flag) System.out.println(-1);
        }
    }
}